package com.study.springbootsecurity.domain.dto;

import com.study.springbootsecurity.enums.QrCodeStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Description: TODO 二维码实体类数据
 * @author: Huangjianyun
 * @date: 2025-06-20 12:50
 */
@Data
@Accessors(chain = true)
public class QRCodeDTO {
    @Schema(description = "二维码唯一性uuid 该字段暂时不返回给前端", example = "2369s83ks11")
    private String uuid;
    @Schema(description = "二维码图片base64编码字符串")
    private String base64QrCode;
    @Schema(description = "二维码生成时间", example = "15156182871")
    private Long createAt;
    @Schema(description = "二维码过期时间: 生成时间+二维码存储redis过期时间TTL 前端：过期时间-当前时间 获取二维码实际还剩多少秒过期", example = "15285915u1")
    private Long expireDate;
    @Schema(description = "二维码当前状态", example = "0-待扫描状态 1-已扫描待确认 2-已确认登录 3-已过期 4-已使用 5-已取消")
    private QrCodeStatus Status;
    @Schema(description = "二维码登录成功后生成的凭证")
    private String loginToken;
    @Schema(description = "扫码用户名 即手机用户名")
    private String scannedUsername;

}
